<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class ExampleCommand extends Command
{
    protected $signature = 'sync_infos';
    protected $description = '命令描述 例如：同步信息';


    /**
     * FunctionName：handle     * Description：
     * Author：lwl
     */
    public function handle()
    {
//        DB::beginTransaction(); //如需要
        try {
            //逻辑


        } catch (\Exception $exception) {
//            DB::rollBack();//如需要
            $this->error($this->signature . ":执行失败 错误信息:" . $exception->getMessage());
        }
        $this->info($this->signature . ":执行成功");
//        DB::commit();//如需要
    }
}
